package fxy;

public enum PayrollDay {
	MONDAY(PayType.WEEKDAY),TUESDAY(PayType.WEEKDAY),WENDNESDAY(PayType.WEEKDAY),THURSDAY(PayType.WEEKDAY),
	FRIDAY(PayType.WEEKDAY),SATURDAY(PayType.WEEKEND),SUANDAY(PayType.WEEKEND);
	private final PayType payType;

	private PayrollDay(PayType payType) {
		this.payType = payType;
	}

	double pay(double hoursWorked, double payRate){
		return payType.pay(hoursWorked, payRate); 
	}
	
	private enum PayType{
		WEEKDAY{
			@Override
			double overtimePay(double hrs, double payRate) {
				return 0;
			}
			
		},
		WEEKEND{

			@Override
			double overtimePay(double hrs, double payRate) {
				return 0;
			}
			
		};
		
		private static final int HOURS_PER_SHIFT = 8;
		
		abstract double overtimePay(double hrs, double payRate);
		
		double pay(double hoursWorked, double payRate){
			double basePay = hoursWorked * payRate;
			return basePay + overtimePay(hoursWorked, payRate);
		}
	}
}
